In Search of Semantic Models for Reconciling Futures and Transactional Memory
نویسندگان
چکیده
Transactional memory (TM) [Herlihy and Moss 1993; Shavit and Touitou 1997] is one of the most promising paradigms to synchronize concurrent access to shared state. An extensive amount of work in the area of TM has focused on transaction execution models that assume that the operations of a transaction are issued sequentially. However, there are many cases where it may be beneficial to exploit concurrency within a single transaction.This has motivated the study of abstractions that allow programmers to express parallelism in the context of transactional systems. There are two abstractions that are extremely relevant in this context. One is the abstraction of parallel nesting, where multiple sub-transactions, that are part of an larger outer (also called top-level) transaction, can be launched in parallel, using language constructs such as cobegin/coend, parallelfor, etc. The other is the future [Halstead Jr 1985] abstraction, which lets programmers activate a parallel task and return a future contract, i.e., a promise to deliver the result of the task when the contract is evaluated. Analogously to parallel nesting, futures allow programmers to express when parallelization is useful: at which point in an otherwise sequential program a parallel task should be started (i.e., when the future is created) and when this task needs to be completed (i.e., when the future is evaluated). Differently from the parallel nesting model, however, the future abstraction does not block the execution of the main thread, also called continuation in the context of futures, till the completion of nested parallel transactions. Further, futures are not necessarily evaluated by the thread that created them. Also, a thread may create a future f and, in the continuation of f evaluate a different future f 0 (without having first evaluated f ). Overall, futures are able to generate a wider range of concurrent computations and enable programming patterns not supported by parallel nesting. The abstraction of Futures has been studied for type-specific optimization on long-lived shared data structures [Kogan and Herlihy 2014] and language integration [Welc et al. 2005]. Interestingly, while the combination of parallel nesting and and transactions has been extensively studied in the literature [Barreto et al. 2010; Barreto et al. 2012; Diegues and Cachopo 2013; Agrawal et al. 2008; Baek et al. 2010], we are not aware of works on the combination of futures and TMs — an abstraction which we call Transactional Futures. In this work, we focus on the problem of defining desirable atomicity and isolation semantics for systems in which futures are used to coordinate the execution of parallel tasks, and whose accesses to shared data are synchronized via transactions. We start by illustrating, via a set of examples of concurrent computations with increasing complexity, the spectrum of issues that need to be addressed when defining the semantics of transactional futures. We show that, given the futures’ ability to generate parallel computations with complex dependency graphs, there are different alternatives to define the notion of atomicity between a future and its continuation. On the basis of these considerations, we formalize four different semantics over two dimensions: the degree of atomicity between futures and continuations, and their admitted serialization orders. The proposed semantics are defined on the basis of a graph-based characterization of the dependencies developed by transactions, both by interacting via reads or writes to shared variables and via the creation and evaluation of futures.
منابع مشابه
Transactional Tasks: Parallelism in Software Transactions
Many programming languages, such as Clojure, Scala, and Haskell, support different concurrency models. In practice these models are often combined, however the semantics of the combinations are not always well-defined. In this paper, we study the combination of futures and Software Transactional Memory. Currently, futures created within a transaction cannot access the transactional state safely...
متن کاملTransactional Tasks: Parallelism in Software Transactions (Artifact)
Many programming languages support different concurrency models. In practice these models are often combined, however the semantics of the combinations are not always well-defined. We studied the combination of futures and Software Transactional Memory. We introduce transactional tasks, a mechanism to create futures in a transaction. Transactional tasks allow the parallelism in a transaction to...
متن کاملPsychometric Properties of the Persian Word Pairs Task for Declarative Memory Assessment
Objective: According to the declarative/procedural model, the semantic aspect of language depends on the brain structures responsible for declarative memory. The word pairs task is a common tool for evaluating declarative memory. The current study aimed to design a valid and reliable task for evaluating declarative memory in Persian children at learning and retention stages and to investigate i...
متن کاملAdvertising Keyword Suggestion Using Relevance-Based Language Models from Wikipedia Rich Articles
When emerging technologies such as Search Engine Marketing (SEM) face tasks that require human level intelligence, it is inevitable to use the knowledge repositories to endow the machine with the breadth of knowledge available to humans. Keyword suggestion for search engine advertising is an important problem for sponsored search and SEM that requires a goldmine repository of knowledge. A recen...
متن کاملValidity of transactional analysis and emotional intelligence in training nursing students
Introduction: Emotional intelligence (EI) is considered a critical componentof a nurse’s characteristic trait which is known as a significant predictor of aperson’s job performance and life success. Transactional Analysis (TA) plays a fundamental role in nurse-patient communication and managing emotionsduring difficult dialect with patients. The aim of this review is to discuss theframework of ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2015